﻿using CsGo.Load;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraSplashScreen;
using System;
using System.Threading;

namespace CsGo.User
{
    public partial class MainForm : RibbonForm
    {
        public MainForm()
        {
            InitializeComponent();
            // 打开缓存界面
            SplashScreenManager.ShowForm(this, typeof(LoadForm), true, true, false);
            for (int i = 1; i <= 100; i++)
            {
                SplashScreenManager.Default.SendCommand(LoadForm.SplashScreenCommand.SetProgress, i);
                SplashScreenManager.Default.SendCommand(LoadForm.SplashScreenCommand.Command2, "正在加载.." + i + "%");
                Thread.Sleep(new Random().Next(1, 20));
            }
            // 关闭缓冲界面
            SplashScreenManager.CloseForm(false);
        }
    }
}
